package org.apache.mf.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.apache.mf.service.ISmsService;

/**
 * @Author: kyrie  @date: 2023/1/28 16:47
 * @Description:
 * @Package: org.apache.mf.service.impl
 */
@Slf4j
public class SmsServiceImpl implements ISmsService {

    /**
     * 访问ID
     */
    private String accessKeyId;
    /**
     * 访问凭证
     */
    private String accessKeySecret;

    public SmsServiceImpl(String accessKeyId, String accessKeySecret) {
        this.accessKeyId = accessKeyId;
        this.accessKeySecret = accessKeySecret;
    }

    /**
     * 发送短信
     *
     * @param phone           手机号
     * @param areaCode        手机区号
     * @param smsTemplateCode 短信模版code
     * @param data            发送数据
     */
    @Override
    public void send(String phone, String areaCode, String smsTemplateCode, String data) {
        log.info("##### 短信发送鉴权信息：accessKeyId={}, accessKeySecret={}", accessKeyId, accessKeySecret);
        log.info("##### 短信发送: 接收手机号：{}，接收手机区号：{}，短信模版code：{}，短信内容为：{}", phone, areaCode, smsTemplateCode, data);
        // todo 具体业务逻辑自行实现
    }
}
